package com.zc.client.http;


import com.zc.client.http.enums.ServiceType;
import com.zc.client.http.enums.SourceType;
import com.zc.client.http.form.AnchorWithDrawFrom;
import com.zc.client.http.form.LoginFrom;
import com.zc.client.http.form.ProgramListForm;
import com.zc.client.http.form.SpaceshipForm;
import org.junit.jupiter.api.Test;

/**
 * 星际战舰测试
 *
 * @author wzy
 * @Date 2025/9/18 15:07
 */
public class SpaceshipClient {

    private static final String game = "fruitLand";
    /**
     * 深矿夺宝 -下饵
     */
    /*3dbcfe58d0d24d89b2295086ad71c8f6*/
    @Test
    public void testSpaceshipBaits() {
        // 查看info
        SendGiftClient sendGiftClient = new SendGiftClient(SourceType.DEV, ServiceType.LUKE_DEV, "/user/"+game+"/info");
        sendGiftClient.creatPost();
        sendGiftClient.setSessionId("f4396e04c372481095e5df0026e2d8da");
        System.out.println("----------下饵前----------");
        sendGiftClient.postExecute(null);
        // 下饵 每坑位下10饵
        sendGiftClient.setPort("/user/"+game+"/baiting");
        sendGiftClient.creatPost();
        for (int place = 0; place < 8; ) {
            SpaceshipForm spaceshipForm = new SpaceshipForm();
            spaceshipForm.setCount(50L);
            spaceshipForm.setProgramId(2519);
            spaceshipForm.setPlace(place);
            sendGiftClient.postExecute(spaceshipForm);
            place++;
        }
        // 查看info
        System.out.println("----------下饵后----------");
        sendGiftClient.setPort("/user/"+game+"/info");
        sendGiftClient.creatPost();
        sendGiftClient.postExecute(null);
    }

    /**
     * 深矿夺宝 - 查看日志
     */
    @Test
    public void testSpaceshipLogs() {
        // 查看我的日志
        System.out.println("----------我的日志----------");
        SendGiftClient sendGiftClient = new SendGiftClient(SourceType.DEV, ServiceType.LUKE_DEV, "/user/"+game+"/myLogs");
        sendGiftClient.creatPost();
        sendGiftClient.setSessionId("f4396e04c372481095e5df0026e2d8da");
        sendGiftClient.postExecute(null);
        // 查看30场日志
        System.out.println("----------30场日志----------");
        sendGiftClient.setPort("/user/"+game+"/lastLogs");
        sendGiftClient.creatPost();
        sendGiftClient.postExecute(null);
        // 查看100场日志
        System.out.println("----------100场日志----------");
        sendGiftClient.setPort("/user/"+game+"/totalLogs");
        sendGiftClient.creatPost();
        sendGiftClient.postExecute(null);
    }

    /**
     *  深矿夺宝 - 查看info
     */
    @Test
    public void testSpaceshipInfo() throws InterruptedException {
        // 查看info
        SendGiftClient sendGiftClient = new SendGiftClient(SourceType.DEV, ServiceType.LUKE_DEV, "/user/"+game+"/info");
        sendGiftClient.creatPost();
        sendGiftClient.setSessionId("f4396e04c372481095e5df0026e2d8da");
        for (int place = 0; place < 8; ) {
            sendGiftClient.postExecute(null);
            Thread.sleep(1000L);
        }
    }

}
